<template>
	<view class="new-users copy-data">
		<view class="moneyBox">
			<view class="topUser">
				<p>自动分账余额：<span style="color: #1D85E1;">{{merchantDetail.balance}}</span></p>
			</view>
			<view class="bottomMoney">
				<p>总余额</p>
				<p>已分余额</p>
				<p style="color: #1D85E1;">{{merchantDetail.accumulatedRechargeBalance}}</p>
				<p style="color: #1D85E1;">{{merchantDetail.amountIssued}}</p>
			</view>
		</view>
	</view>
</template>
<script>
	import {
		getMerchant
	} from '@/api/business.js';
	export default {
		data() {
			return {
				merchantDetail: {},
			};
		},
		onLoad() {
		},
		onShow() {
			this.getDetail();
		},
		methods: {
			getDetail() {
				getMerchant().then((res) => {
					this.merchantDetail = res.data;
				});
			},
		},
	};
</script>
<style lang="scss" scoped>
	page,
	body {
		height: 100%;
	}


	.moneyBox {
		display: flex;
		flex-direction: column;
		padding: 36rpx 43rpx;
		margin: 30rpx;
		border-radius: 20rpx;
		background: linear-gradient(180deg, #FFFFFF, #E6EEFA);

		.topUser {
			width: 100%;
			display: flex;
			justify-content: space-between;
			align-items: center;
			border-bottom: 2rpx solid #BDD0EE;
			padding-bottom: 40rpx;
			font-weight: bold;
		}

		.bottomMoney {
			display: flex;
			flex-wrap: wrap;
			color: #666666;
			padding: 10rpx;
			text-align: center;
			margin: 20rpx 0rpx 0rpx 0rpx;

			p {
				width: 50%;
				margin: 10rpx 0rpx;
			}
		}
	}
</style>